﻿
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.Collections;
using Model;


namespace MsDAL
{
    public partial class Sys7a00DAL : Sys7a00Base
    {
        /// <summary>
        /// 删除明细表
        /// </summary>
        public SqlApp DelDetail(string plistid)
        {
            string sql = " DELETE FROM Sys7a01 WHERE plistid = @plistid";
            SqlParameter[] parameters = {
				new SqlParameter("@plistid", SqlDbType.NVarChar)
				};
            parameters[0].Value = plistid;

            return new SqlApp(sql, new ArrayList(parameters), true, " ");
        }

        /// <summary>
        /// 更新概要表的sorttype字段
        /// </summary>
        public SqlApp UpdateSortStr(string listid, string sortstr)
        {
            string sql = " UPDATE Sys7a00 SET sortstr =@sortstr WHERE listid = @listid";
            SqlParameter[] parameters = {
				new SqlParameter("@listid", SqlDbType.NVarChar),
                new SqlParameter("@sortstr", SqlDbType.NVarChar)
				};
            parameters[0].Value = listid;
            parameters[1].Value = sortstr;

            return new SqlApp(sql, new ArrayList(parameters), false, "自定义排序失败！");
        }
    }
}

